import http from '../util/http.js'

const cartUrl = '/cart/queryCart'
const queryProductUrl = '/cart/queryProduct'
const createUrl = '/cart/create'
const modifyUrl = '/cart/modify'

const queryCart = (data) => {
    return http.post(cartUrl, data)
}

const queryProduct = () => {
    return http.get(queryProductUrl)
}

const create = (data) => {
    return http.post(createUrl, data)
}

const modify = (data) => {
    return http.put(modifyUrl,data)
}

export default {
    queryCart,queryProduct,create,modify
}